package com.okami.java8.method.reference;

/**
 * @description: 匿名内部类、Lambda表达式、方法引用演示
 * @author: TanJingyu
 * @create: 2020-09-11 17:12
 **/
class Go {
    static void go() {
        System.out.println("Go::go()");
    }
}

public class RunnableMethodReference {
    public static void main(String[] args) {

        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("Anonymous");
            }
        }).start();

        new Thread(
                () -> System.out.println("lambda")
        ).start();

        new Thread(Go::go).start();
    }
}
